#include <stdio.h>
int main(){
int num = 1024;
while(num != 0){
int digit = num % 10;
num = num / 10;
printf("%d\n", digit);
}
return 0;
}
%d - to print value in int format.
%o - to print value in octal format.
%x - to print value in hexadecimal format (letters will print in lowercase)
%lx - to print value in hex (long int) format (i.e any number > 0xFFFFFFFF (8Fs))
%X - to print value in hexadecimal format (letters will print in uppercase)